function v = getval(x)
  if(isa(x,'deriv1f'))
    v = x.v;
  else
    v = x;
  end
